package com.hs.carrental.service;

import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.hs.carrental.dto.LoginDto;
import com.hs.carrental.dto.RegisterDto;
import com.hs.carrental.dto.customer.CustomerPageDto;
import com.hs.carrental.dto.customer.CustomerSaveDto;
import com.hs.carrental.dto.customer.GetUserInfoDto;
import com.hs.carrental.dto.customer.UpdatePasswordDto;
import com.hs.carrental.entity.Customer;
import com.baomidou.mybatisplus.extension.service.IService;
import com.hs.carrental.vo.LoginVo;
import com.hs.carrental.vo.UpdatePasswordVo;
import com.hs.carrental.vo.customer.CustomerPageVo;

import java.io.UnsupportedEncodingException;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author lyy
 * @since 2021-03-17
 */
public interface ICustomerService extends IService<Customer> {

    boolean register(RegisterDto registerDto) throws UnsupportedEncodingException;

    boolean checkUserName(String userName,Integer type);

    JSONObject login(LoginDto loginDto) throws Exception;

    boolean save(CustomerSaveDto customerSaveDto) throws UnsupportedEncodingException;

    IPage<CustomerPageVo> getPage(CustomerPageDto customerPageDto);

    UpdatePasswordVo updatePassword(UpdatePasswordDto updatePasswordDto) throws Exception;

    JSONObject getUserInfo(GetUserInfoDto getUserInfoDto);

    boolean updateUserInfo(JSONObject jsonObject);
}
